package com.ruoyi.system.service.impl;

import java.util.List;

import com.ruoyi.system.domain.vo.maintenanceChart;
import com.ruoyi.system.domain.vo.RepairsChart;
import com.ruoyi.system.domain.vo.resolvedChart;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.TmMaintenanceRecordMapper;
import com.ruoyi.system.domain.TmMaintenanceRecord;
import com.ruoyi.system.service.ITmMaintenanceRecordService;

/**
 * 宿舍维修历史记录Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-12-05
 */
@Service
public class TmMaintenanceRecordServiceImpl implements ITmMaintenanceRecordService 
{
    @Autowired
    private TmMaintenanceRecordMapper tmMaintenanceRecordMapper;

    /**
     * 查询宿舍维修历史记录
     * 
     * @param recordId 宿舍维修历史记录主键
     * @return 宿舍维修历史记录
     */
    @Override
    public TmMaintenanceRecord selectTmMaintenanceRecordByRecordId(Long recordId)
    {
        return tmMaintenanceRecordMapper.selectTmMaintenanceRecordByRecordId(recordId);
    }

    @Override
    public List<maintenanceChart> selectTmMaintenanceRecordByChart(TmMaintenanceRecord tmMaintenanceRecord) {
        return tmMaintenanceRecordMapper.selectTmMaintenanceRecordByChart(tmMaintenanceRecord);
    }

    @Override
    public List<RepairsChart> selectTmMaintenanceRepairsByChart(TmMaintenanceRecord tmMaintenanceRecord) {
        return tmMaintenanceRecordMapper.selectTmMaintenanceRepairsByChart(tmMaintenanceRecord);
    }

    @Override
    public resolvedChart  selectresolvedByChart(TmMaintenanceRecord tmMaintenanceRecord) {
        return tmMaintenanceRecordMapper.selectresolvedByChart(tmMaintenanceRecord);
    }

    /**
     * 查询宿舍维修历史记录列表
     * 
     * @param tmMaintenanceRecord 宿舍维修历史记录
     * @return 宿舍维修历史记录
     */
    @Override
    public List<TmMaintenanceRecord> selectTmMaintenanceRecordList(TmMaintenanceRecord tmMaintenanceRecord)
    {
        return tmMaintenanceRecordMapper.selectTmMaintenanceRecordList(tmMaintenanceRecord);
    }

    /**
     * 新增宿舍维修历史记录
     * 
     * @param tmMaintenanceRecord 宿舍维修历史记录
     * @return 结果
     */
    @Override
    public int insertTmMaintenanceRecord(TmMaintenanceRecord tmMaintenanceRecord)
    {
        return tmMaintenanceRecordMapper.insertTmMaintenanceRecord(tmMaintenanceRecord);
    }

    /**
     * 修改宿舍维修历史记录
     * 
     * @param tmMaintenanceRecord 宿舍维修历史记录
     * @return 结果
     */
    @Override
    public int updateTmMaintenanceRecord(TmMaintenanceRecord tmMaintenanceRecord)
    {
        return tmMaintenanceRecordMapper.updateTmMaintenanceRecord(tmMaintenanceRecord);
    }

    /**
     * 批量删除宿舍维修历史记录
     * 
     * @param recordIds 需要删除的宿舍维修历史记录主键
     * @return 结果
     */
    @Override
    public int deleteTmMaintenanceRecordByRecordIds(Long[] recordIds)
    {
        return tmMaintenanceRecordMapper.deleteTmMaintenanceRecordByRecordIds(recordIds);
    }

    /**
     * 删除宿舍维修历史记录信息
     * 
     * @param recordId 宿舍维修历史记录主键
     * @return 结果
     */
    @Override
    public int deleteTmMaintenanceRecordByRecordId(Long recordId)
    {
        return tmMaintenanceRecordMapper.deleteTmMaintenanceRecordByRecordId(recordId);
    }
}
